// OpenCmdHere.h : Declaration of the COpenCmdHere

#ifndef __OPENCMDHERE_H_
#define __OPENCMDHERE_H_

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// COpenCmdHere
class ATL_NO_VTABLE COpenCmdHere : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<COpenCmdHere, &CLSID_OpenCmdHere>,
	public IShellExtInit,
	public IContextMenu
{
public:
	COpenCmdHere()
	{
		m_szFile[0] = 0;
	}

DECLARE_REGISTRY_RESOURCEID(IDR_OPENCMDHERE)

BEGIN_COM_MAP(COpenCmdHere)
	COM_INTERFACE_ENTRY(IShellExtInit)
	COM_INTERFACE_ENTRY(IContextMenu)
END_COM_MAP()

// IOpenCmdHere
public:

public:
  // IShellExtInit
  STDMETHODIMP Initialize(LPCITEMIDLIST, LPDATAOBJECT, HKEY);

public:
  // IContextMenu
  STDMETHODIMP GetCommandString(UINT, UINT, UINT*, LPSTR, UINT);
  STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO);
  STDMETHODIMP QueryContextMenu(HMENU, UINT, UINT, UINT, UINT);

protected:
  TCHAR m_szFile[MAX_PATH];
};

#endif //__OPENCMDHERE_H_
